#ifndef r5_h

#define IDLING      4
#define READING   5
#define WRITING   6
#define RINGSIZE  50

/**************************
Structure
**************************/
typedef struct dcb {
	int flag;
	int status;
	char *in_buff;
	int *in_count;
	int in_done;
	char *out_buff;
	int *out_count;
	int out_done;
	char ring_buffer[RINGSIZE];
	int ring_buffer_in;
	int ring_buffer_out;
	int ring_buffer_count;
} DCB; 

/**************************
function prototypes
**************************/
int com_open(int *ef_p, int baud_rate);
int com_close(void);
int com_read(char *buf_p, int *count_p);
int com_write(char *buf_p, int *count_p);
void interrupt interrupt_top();
#endif